package com.coco.bargain.service.impl;

import com.coco.bargain.mapper.BargainUserMapper;
import com.coco.bargain.pojo.TbBargainUser;
import com.coco.bargain.service.BargainUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author HanSama
 * @date 2021年07月22日 20:29
 */
@Service
public class BargainUserServiceImpl implements BargainUserService {

    @Autowired
    private BargainUserMapper bargainUserMapper;

    @Override
    public void add(TbBargainUser tbBargainUser) {
        bargainUserMapper.add(tbBargainUser);
    }

    @Override
    public void update(TbBargainUser tbBargainUser) {
        bargainUserMapper.update(tbBargainUser);
    }

    @Override
    public TbBargainUser findById(Long id) {
        return bargainUserMapper.findById(id);
    }

    @Override
    public Integer findByUserBargainGoodCount(Long gid) {
        return bargainUserMapper.findByUserBargainGoodCount(gid);
    }

    @Override
    public TbBargainUser findByCard(String card) {
        return bargainUserMapper.findByCard(card);
    }

}
